<div class="logo">
   <a href="<?=site_url()?>"><img src="<?=base_url()."images/logo_word.png"?>" border="0"></a>
</div>
<div class="header_central" align="center">
   <span class="header_central_text">Accounting</span>
   <?php if (isset($k_company) && $k_company != null ) : ?>
   <span class="header_central_company">&nbsp; &nbsp;<?=htmlspecialchars($k_company["com_name"])?></span>
   <?php endif;?>
</div>
<div class="header_right_top">
   <?php if (isset ($k_user) && $k_user != null) :?>
   <div id="profileContainer">
       <a href="#" id="profileButton"><span>
       		<?=htmlspecialchars($k_user["user_login"])?></span><em></em></a>
       <div style="clear:both"></div>
           <div id="profileBox">                
                <div id="profileForm">
                	<fieldset id="body">
                        <div class="block_menu">
							<div class="block_menu_icon"><a href="<?=site_url("users/changepwd")?>"><img src="<?=base_url("images/change_pwd.png")?>" /></a></div>
							<div class="block_menu_text"><a href="<?=site_url("users/changepwd")?>">Change password</a></div>
							<div class="push"></div>
						</div>

						<?php 
							$uri = trim(uri_string(), "/"); 
							if ($uri != "main/companyselection") :
						?>
						
						<div class="block_menu">
							<div class="block_menu_icon"><a href="<?=site_url("main/companyselection")?>"><img src="<?=base_url("images/company_16.png")?>" /></a></div>
							<div class="block_menu_text"><a href="<?=site_url("main/companyselection")?>">Select Company</a></div>
							<div class="push"></div>
						</div>
						
						
						<?php endif; ?>
						
						
                        <div class="block_menu">
							<div class="block_menu_icon"><a href="<?=site_url("main/logout")?>"><img src="<?=base_url("images/logout.png")?>" /></a></div>
							<div class="block_menu_text"><a href="<?=site_url("main/logout")?>">Logout</a></div>
							<div class="push"></div>
						</div>
                    </fieldset>
                </div>
          </div>
   </div>
   
   <?php endif; ?>
   
</div>